<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.js"></script>
</head>
<body>
    <div id="app"> 
        <children></children>
    </div>
    <script>
        const parent={
            template:'<div><h2>我是父组件</h2></div>',
        }
        const children={
            template:'<div><h2>我是子组件</h2><parent/></div>',
            components:{
                parent: parent,
            }
        }
        const app=new Vue({
            el:'#app',
            data:{},
            methods:{},
            components:{
                children: children,
            }
        });
    </script>
</body>
</html>